import Script from "next/script";
import Refer from "../Refer";

export const metadata = {
  title: "How to Compare JSON Structurally/Semantically?",
  keywords:
    "JSON compare, JSON diff, compare JSON, JSON comparison, JSON Diff Tool, Online JSON diff, JSON diff checker, JSON diff viewer, Free JSON comparison tool, JSON file comparison, Visual JSON diff",
  description:
    "An advanced online tool to compare two JSON documents. Instantly spot differences with a side-by-side comparison view.",
};

# How to Compare JSON Structurally/Semantically?

JSON For You provides an easy-to-use JSON comparison feature that helps you quickly identify the differences between two JSON data, supporting features like highlighting inline differences, synchronized scrolling, and automatic text comparison.

<img src="/example/compare.webp" alt="JSON Compare Feature" />

## Steps

To use the structural comparison feature in JSON For You, follow these steps:

1. Switch the right-side view to "Text" view at the top;
2. Paste the JSON strings to be compared into the left and right editors respectively;
3. Click the "Compare" button at the top to perform a structural comparison;

If there are no differences, a "No differences" prompt will appear in the bottom right corner.

If there are differences, a "Differences found" prompt will appear, and the differing parts will be highlighted. The left and right editors will scroll synchronously when you view the differences. You can click the "Sync Scroll" button on the sidebar to enable or disable this feature.

If you want to perform a text comparison instead of a structural one, follow these steps:

1. Click the switch to the left of the "Compare" button to change to "Text Compare" mode;
2. Click the "Text Compare" button;

## Use Cases for JSON Comparison

- **API Debugging**: Compare differences between frontend and backend JSON responses
- **Version Control**: View the change history of JSON configuration files
- **Data Validation**: Verify if the API return data structure meets expectations

<Refer />
